package com.betterwood.dragon.core.config;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@ConfigurationProperties(prefix = "dragon")
@Component
public class DragonConfig implements InitializingBean {

    private String imgUrl;//图片服务器域名
    private String serverUri;//网站访问域名
    private String serverSpiUri;//网站接口访问域名全

    @Override
    public void afterPropertiesSet() throws Exception {
        IMG_URL=imgUrl;
        SERVER_URI=serverUri;
        SERVER_SPI_URI=serverSpiUri;
    }

    public static String IMG_URL;
    public static String SERVER_URI;
    public static String SERVER_SPI_URI;
}
